import request from '@/router/axios';
import {downloadExcel} from '@/router/axios';
import {formatCondition} from '@/util/util';
//单条查询
export const queryBizQuestionSubjectConfig = (params) => {
  params.head.transCode = 'queryBizQuestionSubjectConfig';
  return request({
    url: '/biz/question/bizQuestionSubjectConfig/queryBizQuestionSubjectConfig',
    method: 'post',
    data: params
  })
}
//多条列表查询，支持条件查询
export const queryBizQuestionSubjectConfigListPage = (params) => {
  params.head.transCode = 'queryBizQuestionSubjectConfigListPage';
  return request({
    url: '/biz/question/bizQuestionSubjectConfig/queryBizQuestionSubjectConfigListPage',
    method: 'post',
    data: params
  })
}
//新增单条记录
export const saveBizQuestionSubjectConfig = (params) => {
  params.head.transCode = 'saveBizQuestionSubjectConfig';
  return request({
    url: '/biz/question/bizQuestionSubjectConfig/saveBizQuestionSubjectConfig',
    method: 'post',
    data: params
  })
}
//新增多条记录
export const saveBizQuestionSubjectConfigList = (params) => {
  params.head.transCode = 'saveBizQuestionSubjectConfigList';
  return request({
    url: '/biz/question/bizQuestionSubjectConfig/saveBizQuestionSubjectConfigList',
    method: 'post',
    data: params
  })
}
//新增或修改单条记录
export const saveOrUpdateBizQuestionSubjectConfig = (params) => {
  params.head.transCode = 'saveOrUpdateBizQuestionSubjectConfig';
  return request({
    url: '/biz/question/bizQuestionSubjectConfig/saveOrUpdateBizQuestionSubjectConfig',
    method: 'post',
    data: params
  })
}


//新增或修改单条记录
export const saveOrUpdateBizQuestionSubjectConfigList = (params) => {
  params.head.transCode = 'saveOrUpdateBizQuestionSubjectConfigList';
  return request({
    url: '/biz/question/bizQuestionSubjectConfig/saveOrUpdateBizQuestionSubjectConfigList',
    method: 'post',
    data: params
  })
}

//修改单条记录
export const updateBizQuestionSubjectConfig = (params) => {
  params.head.transCode = 'updateBizQuestionSubjectConfig';
  return request({
    url: '/biz/question/bizQuestionSubjectConfig/updateBizQuestionSubjectConfig',
    method: 'post',
    data: params
  })
}

//删除单条记录
export const deleteBizQuestionSubjectConfig = (params) => {
  params.head.transCode = 'deleteBizQuestionSubjectConfig';
  return request({
    url: '/biz/question/bizQuestionSubjectConfig/deleteBizQuestionSubjectConfig',
    method: 'post',
    data: params
  })
}

//删除多条记录
export const deleteBizQuestionSubjectConfigList = (params) => {
  params.head.transCode = 'deleteBizQuestionSubjectConfigList';
  return request({
    url: '/biz/question/bizQuestionSubjectConfig/deleteBizQuestionSubjectConfigList',
    method: 'post',
    data: params
  })
}
//导出excel
export const exportBizQuestionSubjectConfigExcel = (params) => {
  downloadExcel({
    url: '/biz/question/bizQuestionSubjectConfig/excelDownload/exportBizQuestionSubjectConfigExcel',
    method: 'get',
    data: 
    {
      tenantId: params.head.tenantId,
      orders:'',
      condition: formatCondition(params.body.sqlCondition)
    }
  })
}
